﻿@using CosmosDb.Data
@model CosmosDbViewModel
@{
    ViewData["Title"] = "Home Page";
}

<div class="text-center">
    <h1 class="display-4">Welcome</h1>
    <p>Learn about <a href="https://docs.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
</div>

<!-- Steeltoe: Display information from CosmosDB. -->
<div class="alert alert-secondary">
    <h4>Objects stored in CosmosDB container</h4>
    <table class="table table-bordered table-primary">
        <thead>
        <tr>
            <th scope="col">Id</th>
            <th scope="col">Text</th>
        </tr>
        </thead>
        <tbody>
        @foreach (SampleObject sampleObject in Model.SampleObjects)
        {
            <tr>
                <td>@sampleObject.Id</td>
                <td>@sampleObject.Text</td>
            </tr>
        }
        </tbody>
    </table>
</div>
